package sk.xorty.service.impl;

import com.google.common.collect.Lists;
import sk.xorty.domain.Person;
import sk.xorty.service.PersonLister;

import java.util.Collection;
import java.util.Collections;
import java.util.List;

public class InMemoryPersonLister implements PersonLister {

    private static List<Person> people = Lists.newArrayList(
            new Person("Miso", 24), new Person("Socka", 20), new Person("Doug", 70)
    );

    @Override
    public Collection<Person> list() {
        return Collections.unmodifiableCollection(people);
    }

}
